Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in tests for utils on Julia 0.5 #40

Merged
merged 1 commit into from
Oct 24, 2016
Merged

Error in tests for utils on Julia 0.5 #40

merged 1 commit into from
Oct 24, 2016

Conversation

dfdx
Copy link
Owner

@dfdx dfdx commented Oct 19, 2016

Currently Pkg.test("Boltzmann") fails with pretty interesting error:

ERROR: LoadError: LoadError: TypeError: _collect: in typeassert, expected Boltzmann.RBM{Float64,Distributions.Normal,Distributions.Bernoulli}, got Boltzmann.RBM{Float64,Distributions.Normal,Distributions.Bernoulli}

This message to the line 286:

rbms = map(i -> deepcopy(rbm), 1:length(args))

which is supposed to simply create 2 clones of RBM. Strangely enough, error disappears if I add call:

deepcopy(rbm)

just before the line described.

This sound pretty much like a bug in Julia itself (I'm on 0.5.0 currently), but I wasn't able to create a minimal reproducible example to submit an issue. @Rory-Finnegan maybe you know some details of what may be going here or ideas how to make a minimal example?

@rofinn
Copy link
Contributor

rofinn commented Oct 20, 2016

@dfdx I have no idea why that would be happening in 0.5, but I agree that this seems like a bug in julia and warrants opening an issue. As for your fix, it seems appropriate given that it only impacts the test code. Personally, I might include a comment about the issue, but that's just me.

@dfdx
Copy link
Owner Author

dfdx commented Oct 20, 2016

After some time I was able to narrow the issue to a standalone example - see JuliaLang/julia#19041. In our case problematic component is Bernoulli type from Distributions. It turns out, Bernoulli takes type parameter T<:Real, and if it isn't passed, inference sometimes fails with that weird message.

I'm going to give it a couple of days and then use whatever workearound to make tests stable.

@dfdx dfdx merged commit 322226f into master Oct 24, 2016
@dfdx dfdx deleted the deepcopy-bug branch October 24, 2016 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants